home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 128 27 / q27.d81 / t.dt128 docs 10 < prev    next >
Text File  |  2022-08-28  |  13KB  |  460 lines

  1.  
  2.  
  3. EXIT
  4.  
  5.      Exits terminal mode.
  6.  
  7.      Syntax: EXIT
  8.  
  9. CDELAY
  10.  
  11.      Allows you to vary the transmission speed of characters transmitted to
  12. the modem.
  13.  
  14.      Syntax: CDELAY x
  15.  
  16. Where x is an explicit value 0-255, 0 is full speed, 255 is slowest.  This
  17. is the same as the delay factor in the buffer menu.
  18.  
  19. LDELAY
  20.  
  21.      Allows an extra pause after a carriage return is transmitted to the
  22. modem.  This can be used to allow the host system to process the previous
  23. line you transmitted.
  24.  
  25.      Syntax: LDELAY x
  26.  
  27.      Where x is an explicit value 0-255, in increments of 2 jiffies, 0 is
  28. no pause after each line, 255 means pause 510 jiffies after transmitting a
  29. carriage return.  This is the same as the delay factor in the buffer menu.
  30.  
  31. SLEEP
  32.  
  33.      Causes the script to "sleep" or pause.
  34.  
  35.      Syntax: SLEEP x
  36.  
  37.      x is an explicit value 0-255 in 1 jiffy increments.  A value of 1
  38. means to "sleep" for 1 jiffy, a value of 255 means to pause for 255
  39. jiffies, a value of 0 means to pause for 256 jiffies.
  40.  
  41. DELAY
  42.  
  43.      Time is not a standard unit (ex. jiffy) but cause a delay similar to
  44. the delay used for transmitted characters.  A value of 1 is the briefest
  45. delay up to 255 (a value of zero is equivalent to 256).  The value must be
  46. declared explicitly.
  47.  
  48.      Syntax: DELAY x
  49.  
  50.      x = 0-255
  51.  
  52. WAIT
  53.  
  54.      Allows the script to wait until a specified string is received.
  55.  
  56.      Syntax: WAIT "Press a key" x
  57.  
  58.      x = 0-255 (zero means 256)
  59.  
  60.      Wait up to x seconds for the string "Press a key"
  61.  
  62. PROMPT
  63.  
  64.      This is useful to synchronize the script to a specific prompt.
  65.  
  66.      Syntax: PROMPT "send string" x "receive string" y
  67.  
  68.      Sends the "send string" every x seconds until the "receive" string has
  69. been received.  Repeat up to y times.
  70.  
  71.      x & y = 0 - 255 (zero means 256)
  72.  
  73. PERFORM
  74.  
  75.      Equivalent to BASIC's "GOSUB" statement.  Performs a subroutine.
  76.  
  77.      Syntax: PERFORM subroutine
  78.  
  79.      where "subroutine" is an address label.
  80.  
  81.      Example:
  82.  
  83.      PERFORM set{CBM-@}device{CBM-@}to{CBM-@}8
  84.              .
  85.              .
  86.      END
  87.  
  88.  
  89. set{CBM-@}device{CBM-@}to{CBM-@}8  DEVICE 8 0
  90.                  RETURN;               return to calling routine
  91.  
  92. RETURN
  93.  
  94.      Equivalent to BASIC's "RETURN" statement.  Returns to the previous
  95. PERFORM instruction
  96.  
  97.      Syntax: RETURN
  98.  
  99.      Any section of code that is used as a subroutine should conclude with
  100. a RETURN instruction.
  101.  
  102. GOTO
  103.  
  104.      Equivalent to BASIC's "GOTO" statement except that instead of
  105. providing a line number you must provide an address label.
  106.  
  107.      Syntax: GOTO label
  108.  
  109.      Example:
  110.  
  111.        GOTO exit
  112.        .
  113.        . exit   END
  114.  
  115. SELECT/CASE/UNTIL
  116.  
  117.      This is perhaps the most powerful script instruction.  It allows you
  118. to perform a task depending on which character string you receive from the
  119. modem.
  120.  
  121.    Syntax: Select x
  122.                CASE "receive this"  do this
  123.                .
  124.                .
  125.                .
  126.                CASE "receive this"  do this
  127.            UNTIL "this string received"
  128.  
  129.      x is the duration time for the loop and must be stated explicitly.  If
  130. you specify a value of zero the SELECT instruction continues indefinitely
  131. until the string specified in the UNTIL clause is received.  Any other
  132. value is the number of seconds the loop continues.
  133.  
  134.      You must specify at least 1 CASE clause and not more than 255 (if you
  135. find a purpose for that many CASE statements perhaps you should find a new
  136. hobby).
  137.  
  138.      The CASE clause has two parts and can be in several formats.  For the
  139. first part you must specify a "receive" string for each CASE.  The second
  140. part of the CASE clause can be structured in 1 of 3 ways:
  141.  
  142.      1. If you specify a literal string or label string that string is
  143. transmitted to the modem if the receive string specified for that CASE is
  144. received.
  145.  
  146.      2. You can specify a GOTO instruction.  If you do this you must
  147. specify the address label to go to.  If the receive string occurs the GOTO
  148. is executed and the entire SELECT instruction is completed.
  149.  
  150.      3. You can specify a PERFORM instruction.  If you do this you must
  151. specify the name of the subroutine to PERFORM should the receive string
  152. occur.  If it does the subroutine is executed.  When the subroutine
  153. executes its RETURN instruction the SELECT instruction continues at the
  154. exact point it was before the PERFORM.
  155.  
  156.      Any characters processed during the execution of the subroutine are
  157. "invisible" to the SELECT structure that did the PERFORM.
  158.  
  159.      Example:
  160.  
  161.          SELECT 20
  162.             CASE "1" "received 1"
  163.             CASE "2" GOTO process{CBM-@}2
  164.             CASE "3" PERFORM process{CBM-@}3
  165.          UNTIL "4"
  166.  
  167.      This SELECT will monitor characters being received for up to 20
  168. seconds.  If a "1" is received it transmits the string "received 1" to the
  169. modem.
  170.  
  171.     The loop continues to run and will send that string each time a "1" is
  172. received.  If a "2" is received the SELECT stops and program execution
  173. continues at "process{CBM-@}2", an address label.  If we receive a "3" we perform
  174. the subroutine "process{CBM-@}3".  When that subroutine is done processing
  175. continues at the point when the PERFORM was executed.  Time is "frozen"
  176. while a PERFORM instructions is executed, meaning that if the loop was to
  177. run for 5 more seconds before it timed out when the PERFORM was executed,
  178. when control returns to the select the loop will still run for 5 seconds no
  179. matter how long the subroutine took to complete.  If a "4" is received at
  180. any time during the SELECT the loop ends.
  181.  
  182. HANGUP
  183.  
  184.      Hang up the modem.
  185.  
  186.      Syntax: HANGUP
  187.  
  188. EQUAL
  189.  
  190.      Allows comparison of 2 numbers.  If they are equal then branch to the
  191. address label specified.
  192.  
  193.      Syntax: EQUAL number1 x branch
  194.  
  195.      where number1 is a numeric label defined with the NUMBER instruction x
  196. is a value 0-65535.  Any combination of literal values and numeric labels
  197. is valid.  If the 2 numbers are equal then continue processing at the
  198. address label specified.
  199.  
  200. LESS, GREATER, NOTEQUAL all work in a similar fashion.
  201.  
  202.      Example:
  203.  
  204.         LESS number1 number2 branch
  205.  
  206.             can be read as "If number1 < number2 then branch"
  207.  
  208.         GREATER number1 number2 branch
  209.  
  210.             can be read as "If number1 > number2 then branch"
  211.  
  212.         NOTEQUAL number1 number2 branch
  213.  
  214.             can be read as "If number1 <> number2 then branch"
  215.  
  216. ADD SUBTRACT MULTIPLY DIVIDE
  217.  
  218.      Allows simple integer math functions.
  219.  
  220.      Syntax: ADD      number1 x       overflow{CBM-@}branch
  221.              SUBTRACT number2 number1 overflow{CBM-@}branch
  222.              MULTIPLY number1 x       overflow{CBM-@}branch
  223.              DIVIDE   number2 x       overflow{CBM-@}branch
  224.  
  225.      For all 4 instructions you must specify 2 numbers.  The first number
  226. must be a numeric label (label defined by NUMBER).  The second number can
  227. be a literal value or a numeric label.  The result is stored in the first
  228. number specified.  For ADD the second number is added to the first with the
  229. result being stored in the first.  For SUBTRACT the second number is
  230. subtracted from the first with the result being stored in the first.  For
  231. MULTIPLY the 2 numbers are muliplied with the result being stored in the
  232. first.  For DIVIDE the first number is divided by the second with the
  233. quotient being stored in the first.  The remainder is lost.
  234.  
  235.      You must supply an address label for each instruction.  If the result
  236. of a calculation exceeds 65535 or less than 0 the branch is taken.  This
  237. allows you to take action if an overflow or underflow occurs which throws
  238. off the integrity of the numeric label.
  239.  
  240. ASSIGN
  241.  
  242.      Assigns a value to a numeric label.  Similar to BASIC's "LET"
  243. statement.
  244.  
  245.      Syntax: ASSIGN number 12
  246.              ASSIGN number number2
  247.  
  248.      The first number specified must be a numeric label.  The second can be
  249. it literal or numeric label.
  250.  
  251. GETKEY
  252.  
  253.      Allows you to read the keyboard.
  254.  
  255.      Syntax: GETKEY numeric{CBM-@}label
  256.  
  257.      The ASCII value of the character read from the keyboard is stored in
  258. the numeric label specified.
  259.  
  260. DASCII
  261.  
  262.      Displays the Ascii character of a numeric value (similar to BASIC's
  263. "CHR$")
  264.  
  265.      Syntax: DASCII numeric{CBM-@}label
  266.  
  267.      This command is intended mainly as a method of displaying the
  268. character read from the keyboard using the GETKEY command.  It displays the
  269. character of the low byte of the numeric value (the rem